def bucket_sort(lyst, n=100, max_num=10000):
    # 分为100个桶
    buckets = [[] for _ in range(n)]    # 创建桶
    for var in lyst:
        i = min(var // (max_num // n), n-1)
        buckets[i].append(var)
        for j in range(len(buckets[i]-1), 0, -1):
            if buckets[i][j] < buckets[i][j-1]:
                buckets[i][j], buckets[i][j-1] = buckets[i][j-1], buckets[i][j]
            else:
                break
    
    sorted_lyst = []
    for buc in buckets:
        sorted_lyst.extend(buc)
    return sorted_lyst